A technique has been known which calculates a distance to an object around a moving body and the speed of the object on the basis of image information in order to control the moving body. For example, Japanese Unexamined Patent Application Publication No. 2010-146494 discloses a device which switches a detection algorithm for short distance and a detection algorithm for long distance to detect an object in front of a vehicle, on the basis of whether the distance to the object is less than a threshold value.